/**
 * Created by charlie on 18-1-24.
 */
import React from 'react'
import {connect} from 'dva-no-router'
import {bindActionCreators} from 'redux'

import UI from '../components/projectDetail';

class App extends React.Component {
  componentDidMount() {
    const {getBasicPath}=this.props;
    getBasicPath();
  }
  render() {
      return (
          <UI {...this.props}/>
      )
  }
}

const actions = {
  getUrl:(val) =>({type:'projectDetail/getUrl',payload:val}),
  getPrjId:(val) =>({type:'projectDetail/getPrjId',payload:val}),
  getBasicPath:() =>({type:'projectDetail/getBasicPath'}),
};

const mapProps = ({projectDetail}) => ({...projectDetail});

const mapActions = dispatch => ({
    ...bindActionCreators({...actions}, dispatch)
});

export default connect(mapProps, mapActions)(App)